<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script src="https://cdn.bootcss.com/vue/2.2.6/vue.min.js"></script>
</head>
<body>
	<div id="xx" v-bind:class="classObject"></div>
	<script>
		var vm = new Vue({
			el: '#xx',
			data: {
				isActive: true,
				error: null
			},
			computed: {
				classObject: function() {
					return {
						active: this.isActive && !this.error,
						'text-danger' : this.error && this.error.type === 'fatal',
					}
				}
			}
		});
	</script>
</body>
</html>